home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat5 / mips2.z / mips2
Encoding:
Text File  |  1998-10-30  |  5.9 KB  |  133 lines

  1.  
  2.  
  3.  
  4. MMMMIIIIPPPPSSSS2222((((5555))))                                                              MMMMIIIIPPPPSSSS2222((((5555))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      mips2 - MIPS2 architecture extensions and the -mips2 compiler option
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      cccccccc ----mmmmiiiippppssss2222 [ options ] ... file ...
  13.      ffff77777777 ----mmmmiiiippppssss2222 [ options ] ... file ...
  14.      ppppcccc ----mmmmiiiippppssss2222 [ options ] ... file ...
  15.      aaaassss ----mmmmiiiippppssss2222 [ options ] ... file ...
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      The MIPS R4000 processor contains many instruction set extensions to the
  19.      MIPS1 instruction set that was defined by the MIPS R2000/R3000. A subset
  20.      of these instruction set extensions defines the MIPS2 instruction set and
  21.      is accessible with the -mips2 option. The MIPS3 instruction set includes
  22.      the remaining extensions and is described in mips3(5).
  23.  
  24.      The ----mmmmiiiippppssss2222 option is supported when compiling C, C++, Fortran, Pascal or
  25.      Assembly language source files. It instructs the code generation phase to
  26.      generate the MIPS2 instructions wherever beneficial. The option also
  27.      causes the instruction scheduler phase to use the R4000 processor model
  28.      while scheduling instructions. When linking, the ----mmmmiiiippppssss2222 option instructs
  29.      the linker ld(1) to use MIPS2 specific versions of libraries from the
  30.      directory /usr/lib/mips2.
  31.  
  32.      The new features added by the MIPS2 instruction set extensions are:
  33.  
  34.      o    Double precision floating point load and store instructions. This
  35.           can provide significant improvement to code using double precision
  36.           floating point manipulation. A single instruction can load/store a
  37.           double precision floating point value. In contrast, the R2000/R3000
  38.           required using two instructions to reference the upper half and the
  39.           lower half of the double precision value.
  40.  
  41.      o    Intrinsic instructions to convert floating point numbers.  The new
  42.           instructions provide truncate, round, ceiling and floor operations.
  43.           On the R2000/R3000, these instructions were implemented as assembler
  44.           macros which expanded into approximately 11 instructions. Code which
  45.           does significant amount of floating point to integer conversions
  46.           should benefit from the ----mmmmiiiippppssss2222 option.
  47.  
  48.      o    Floating point sqrt instruction. This is faster than the sqrt
  49.           routine in the math libraries for the R2000/R3000.
  50.  
  51.      o    Branch likely instructions. Every branch instruction in the MIPS1
  52.           architecture has a corresponding branch likely form. In this form of
  53.           the branch, the instruction in the delay slot of the branch is
  54.           nullified if the conditional branch is not taken.
  55.  
  56.      o    New compare and trap instructions, which cause an exception to be
  57.           raised based on the result of comparing two registers or a register
  58.           and immediate value. In the R2000/R3000, these instructions were
  59.           implemented as assembler macros which expanded into a sequence using
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. MMMMIIIIPPPPSSSS2222((((5555))))                                                              MMMMIIIIPPPPSSSS2222((((5555))))
  71.  
  72.  
  73.  
  74.           a conditional branch and a break instruction.
  75.  
  76.      A special set of libraries compiled with the ----mmmmiiiippppssss2222 option and making use
  77.      of MIPS2 features is provided in the /usr/lib/mips2 directory. As part of
  78.      the basic development environment you get MIPS2 versions of libfastm.a,
  79.      libm.a and libm43.a libraries. As part of the Fortran compiler you get
  80.      MIPS2 versions of libF77.a, libI77.a, libU77.a and libisam.a .  The
  81.      shared library versions of the above Fortran libraries do not currently
  82.      have a MIPS2 version.
  83.  
  84.      Code compiled and/or linked using the ----mmmmiiiippppssss2222 option will not run on
  85.      R2000/R3000 based machines. Code compiled without the ----mmmmiiiippppssss2222 option will
  86.      run on all machines -- R2000/R3000/R4000 -- within the constraints of
  87.      operating system compatibility. If broad machine base compatibility is an
  88.      issue, SGI recommends using the ----mmmmiiiippppssss2222 option only when significant
  89.      benefit is achieved on an R4000 based system as compared to running the
  90.      same program compiled without the ----mmmmiiiippppssss2222 option on the same R4000 based
  91.      system.
  92.  
  93.      The double precision floating point load and store instructions require
  94.      the data to be aligned on a double word boundary. A non-aligned access
  95.      will cause the program to abort with a "bus error" message. This
  96.      requirement may cause some programs that worked fine earlier, to fail
  97.      when recompiled with the ----mmmmiiiippppssss2222 option. This can happen in some Fortran
  98.      programs that have common blocks with an odd number of integer values
  99.      followed by double precision data.
  100.  
  101. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  102.      _A_s_s_e_m_b_l_y _L_a_n_g_u_a_g_e _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
  103.      _M_I_P_S _R_I_S_C _A_r_c_h_i_t_e_c_t_u_r_e, Gerry Kane and Joe Heinrich, Prentice Hall.
  104.      _M_I_P_S _R_4_0_0_0 _U_s_e_r'_s _M_a_n_u_a_l, Joseph Heinrich, Prentice Hall.
  105.      cc(1), f77(1), pc(1), CC(1), as(1), mips3(5)
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.